//
//  ExchangeViewHeader.m
//  ZDB
//
//  Created by 微笑吧阳光 on 2020/3/19.
//  Copyright © 2020 ZDB. All rights reserved.
//

#import "ExchangeViewHeader.h"

@implementation ExchangeViewHeader

-(void)awakeFromNib{

    [super awakeFromNib];
    KViewRadius(self.headerImage, 26);
    
    
}
-(void)refushDataWith:(NSInteger)showType{
    
    if (showType==0) {
        
        self.nameLab.text = @"未登陆";
        self.jifenNum.text = @"登陆后查看积分";
        
    }else if (showType==1){
        NSDictionary * userDic = [[DJLoginHelper sharedInstance] cj_UserDicc];
        _nameLab.text = [userDic jsonString:@"nikeName"];
        [self.headerImage sd_setImageWithURL:[NSURL URLWithString:[userDic jsonString:@"headImage"]]];
        NSString * sumIntegral = kFormat(@"%@", userDic[@"integral"]);
        NSString * integralStr = kFormat(@"%@%@",@"积分余额:",sumIntegral);
        self.jifenNum.text = integralStr;
    }
    
    
    
}
@end
